package com.campuscrowdsourcing.server.common.constant;

/**
 * @author XinYuan Zhao
 * @since 2023/3/9
 */
public class CommonConst {

    private CommonConst() {}

    /**
     * Token
     */
    public static final String TOKEN_HEADER = "Authorization";
    public static final String TOKEN_PREFIX = "Bearer ";
    public static final Integer TOKEN_SALT_LENGTH = 12;
    public static final Integer TOKEN_EXPIRE_ACCESS = 2;
    public static final Integer TOKEN_EXPIRE_REFRESH = 14;
    /**
     * 验证码过期时间
     */
    public static final Integer TOKEN_CODE = 5;

    /**
     * 状态
     */
    public static final Boolean STATUS_TRUE = true;
    public static final Boolean STATUS_FALSE = false;
    public static final Integer STATUS_ZERO = 0;
    public static final Integer STATUS_ONE = 1;


    /**
     * 字面常量
     */
    public static final String LITERAL_ACCOUNT = "account";
    public static final String LITERAL_EMAIL = "email";
    public static final String LITERAL_PASSWORD = "password";
    public static final String LITERAL_CODE = "code";

    /**
     * 邮箱正则
     */
    public static final String REGEXP_EMAIL = "[a-zA-Z0-9]+@[a-zA-Z0-9]+\\.[a-zA-Z0-9]+";
    /**
     * 手机正则
     */
    public static final String REGEXP_PHONE = " ^[1][3,4,5,6,7,8,9][0-9]{9}$";

}
